package com.kd.rpc;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.kd.rpc.service.Hello;

public class Consumer {

	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "applicationConsumer.xml" });
		context.start();
		
//		Echo echo = (Echo) context.getBean("echoService");
//		System.out.println(echo.echo());
        Hello hello = (Hello) context.getBean("helloService");
        System.out.println(hello.speak("Success to connect to dubbo rpc server, "));
        hello.hello();
//        Person p = (Person) context.getBean("personService");
//        System.out.println(p.getName());
        
   }
}
